#ifndef SCENARIO
#define SCENARIO

// http://www.siteduzero.com/tuto-3-4350-1-creez-vos-propres-types-de-variables.html
// http://www.siteduzero.com/tuto-3-4830-1-l-allocation-dynamique.html

// Structure des parametres d'une map ex : [MAP:niveau_01_1024.png,4576,768,25,200,200,0]
class StrucMap
{
public:
    string st_FileName;
    long n_MapWidth;
    long n_MapHeight;
    long n_MapVelocity;
    long n_MapDelay;
    long n_DefaultX;
    long n_DefaultY;
};

// Class des parametres d'une map ex : [PERSO:Max,max_sprite_01.png,8,max_immo_01.png,1,255,375,80,110,25,200,600,325]
class StrucPerso
{
public:
    long st_PersoID;
    string st_SpriteNameMouvement;
    long n_SpriteMouvement;
    string st_SpriteNameImmobile;
    long n_SpriteNumberImmobile;
    long n_SpriteWidth;
    long n_SpriteHeight;
    long n_SpriteLeftBorder;
    long n_SpriteRightBorder;
    long n_SpriteVelocity;
    long n_SpriteDelay;
    long n_DefaultX;
    long n_DefaultY;
};


// Structure des évènements ex : [EVT_001=FALSE]
class StrucEvenement
{
public:
    string st_Nom;
    bool isActive;
};

// Structure des conditions ex : [EVT_001=TRUE] & [EVT_002=FALSE] | [#STR_010#] | [#STR_011#] | [EVT_002->TRUE]
class StrucCondition
{
public:
    string st_Condition;
    string st_Description;
    string st_Reponse;
    string st_Resultat;
};

// Structure des objets ex : [EVT_001=TRUE] & [EVT_002=FALSE] | [#STR_010#] | [#STR_011#] | [EVT_002->TRUE]
class StrucObjets
{
public:
    string st_Nom;
    string st_FileName;
    long n_ObjetWidth;
    long n_ObjetHeight;
    long n_DefaultX;
    long n_DefaultY;
    vector<StrucCondition> actionLook;
    vector<StrucCondition> actionOpen;
    vector<StrucCondition> actionClose;
    vector<StrucCondition> actionTake;
    vector<StrucCondition> actionTalk;
    vector<StrucCondition> actionUse;
};

/* ----------------------------------------------------
			Classe
  ----------------------------------------------------- */
class cls_Scenario
{

private:
    StrucMap valMap;

public:
    cls_Scenario();
    ~cls_Scenario();

    StrucMap* getParaMap();

    vector<StrucPerso> t_valPerso;
    vector<StrucEvenement> t_valEvenement;
    vector<StrucObjets> t_valObjets;

    int Init();

};


#endif
